<%--
  Created by IntelliJ IDEA.
  User: 宝贝嘉燕
  Date: 2021/9/26
  Time: 8:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
pageContext.setAttribute("name","张三");
request.setAttribute("name","李四");
session.setAttribute("name","王五");
application.setAttribute("name","赵六");


//存年龄
    pageContext.setAttribute("age",10,pageContext.PAGE_SCOPE);
    pageContext.setAttribute("age",11,pageContext.REQUEST_SCOPE);
    pageContext.setAttribute("age",12,pageContext.SESSION_SCOPE);
    pageContext.setAttribute("age",13,pageContext.APPLICATION_SCOPE);

%>
${name}
${requestScope.name}
${applicationScope.name}
<hr>
${age}
</body>
</html>
